package com.nuyoah.service.impl;

import com.nuyoah.entity.ScoreRecord;
import com.nuyoah.entity.Statistics;
import com.nuyoah.mapper.StatisticsMapper;
import com.nuyoah.service.StatisticsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 存储对学习和竞赛成绩的统计分析数据 服务实现类
 * </p>
 *
 * @author xyx
 * @since 2024-06-03
 */
@Service
public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statistics> implements StatisticsService {

    @Override
    public List<Statistics> getAnalysisData(Integer userId) {
        return this.baseMapper.getAnalysisData(userId);
    }

    @Override
    public List<ScoreRecord> getRegular(Integer studentId, String studentGrade) {
        return this.baseMapper.getRegular(studentId, studentGrade);
    }

    @Override
    public List<ScoreRecord> getCompetition(Integer studentId, String competition) {
        return this.baseMapper.getCompetition(studentId, competition);
    }

    @Override
    public List<ScoreRecord> getTotal(Integer studentId) {
        return this.baseMapper.getTotal(studentId);
    }
}
